package Day11;

/**
 * @author HYHwtx
 * @version 1.0
 * @date 2022/2/17 9:16
 */
//Java用选择法对若干个数排序（由大到小）。
public class Test08 {
    public static void main(String[] args) {
        int arr[]={10,5,7,13,92,22,37,61,1,12};
        for (int i = 0; i < arr.length; i++) {
            for (int j = i+1; j < arr.length; j++) {
                if (arr[i]<arr[j]){
                    int temp = arr[i];
                    arr[i] = arr[j];
                    arr[j]=temp;
                }
            }
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
    }
}
